import { lazy } from 'react'
import { EditModal } from '@/desktop/components'
import { Suspense } from '@/desktop/components/Loading'
import './index.module.less'

const Content = lazy(async () => import('./list'))

export { ReactComponent as Icon } from './icon.svg'

export function WelcomeMessage({ open, onClose }: { open: boolean; onClose: () => void }) {
  return <EditModal title="欢迎语增强" open={open} onCancel={onClose} width="800px">
    {open ? (
      <Suspense>
        <Content />
      </Suspense>
    ) : null}
  </EditModal>
}
